
#include "utils.h"

int runCmd(QString cmd) {
    int ret = 0;
    QProcess process;
    process.start(cmd);
    qDebug() << process.program() << process.arguments().join(' ');
    ret = process.waitForFinished(-1);
    qDebug() << "错误输出: " << process.readAllStandardError();
    qDebug() << "标准输出: " << process.readAllStandardOutput();

    return ret;
}
